/**
 * 
 */
package com.youth.fund.hk.hostManager.shiro.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.youth.fund.hk.hostManager.common.dao.ICommonDao;
import com.youth.fund.hk.hostManager.common.service.impl.CommonService;
import com.youth.fund.hk.hostManager.shiro.dao.OrganizationDao;
import com.youth.fund.hk.hostManager.shiro.datamodel.Organization;
import com.youth.fund.hk.hostManager.shiro.service.OrganizationService;

/**
 * @author Sunk_Sky
 *
 *         2014年11月13日下午6:44:35
 */
@Service("OrganizationService")
public class OrganizationServiceImpl extends CommonService<Organization>
		implements OrganizationService
{
	private OrganizationDao organizationDao;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.youth.fund.hk.hostManager.common.service.impl.CommonService#setCommonDao
	 * (com.youth.fund.hk.hostManager.common.dao.ICommonDao)
	 */
	@Autowired
	@Qualifier("OrganizationDao")
	@Override
	public void setCommonDao(ICommonDao<Organization> commonDao)
	{
		this.commonDao = commonDao;

		this.organizationDao = (OrganizationDao) commonDao;
	}

	public Organization createOrganization(Organization organization)
	{
		return organizationDao.createOrganization(organization);
	}

	public Organization updateOrganization(Organization organization)
	{
		return organizationDao.updateOrganization(organization);
	}

	public void deleteOrganization(Long organizationId)
	{
		organizationDao.deleteOrganization(organizationId);
	}

	public Organization findOne(Long organizationId)
	{
		return organizationDao.findOne(organizationId);
	}

	public List<Organization> findAll()
	{
		return organizationDao.findAll();
	}

	public List<Organization> findAllWithExclude(
			Organization excludeOraganization)
	{
		return organizationDao.findAllWithExclude(excludeOraganization);
	}

	public void move(Organization source, Organization target)
	{
		organizationDao.move(source, target);
	}

	/* (non-Javadoc)
	 * @see com.youth.fund.hk.hostManager.common.service.impl.CommonService#generateHtml(java.io.Serializable)
	 */
	@Override
	public void generateHtml(Organization model)
	{
		// TODO Auto-generated method stub
		
	}
}
